----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/code/logs/table_04_restricted_samples.log
  log type:  text
 opened on:  10 Nov 2022, 19:03:56

. *-------------------------------------------------------------------------------
. 
. 
. *Notice that aggregates are only for countries with DA dummies in more than 10 sectors. A DA for a sector is calculated if at least 3 affiliates operate in that coutry-sector p
> air
. local nn=10 /*minimum number of sectors allowed per year-isocode*/

. 
. foreach rsample in decile_2_9 decile_3_8 decile_4_7 decile_5_6 above3ctry above5ctry above10ctry {
  2. display "`rsample'"
  3. clear all
  4. use "${data}/estimates_sec_naics_sales_s1_base_woparent_`rsample'.dta", clear
  5. by year isocode, sort: egen num=count( fe_location )
  6. table isocode year, c(mean  num)
  7. keep if num>=`nn'
  8. keep year isocode
  9. duplicates drop 
 10. tempfile iso
 11. save `iso', replace 
 12. 
. use "${data}/estimates_agg_naics_sales_s1_base_woparent_`rsample'.dta", clear
 13. merge m:1 year isocode using `iso'
 14. keep if _merge==3
 15. drop _merge
 16. tempfile file_`rsample'
 17. save `file_`rsample'', replace 
 18. }
decile_2_9

----------------
          | year
  isocode | 2016
----------+-----
       AT |   16
       BE |   18
       BG |   17
       CZ |   17
       DE |   18
       DK |   18
       EE |   17
       ES |   18
       FI |   18
       FR |   18
       GB |   18
       GR |   17
       HR |   17
       HU |   18
       IT |   18
       JP |   13
       KR |   15
       LT |   17
       LV |   16
       MX |   13
       NL |   17
       PL |   18
       PT |   18
       RO |   18
       SE |   18
       SI |   16
       SK |   17
----------------
(0 observations deleted)

Duplicates in terms of all variables

(432 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000g.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000g.tmp saved

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                27  (_merge==3)
    -----------------------------------------
(0 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000h.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000h.tmp saved
decile_3_8

----------------
          | year
  isocode | 2016
----------+-----
       AT |   16
       BE |   18
       BG |   16
       CZ |   17
       DE |   18
       DK |   18
       EE |   17
       ES |   18
       FI |   18
       FR |   18
       GB |   18
       GR |   17
       HR |   17
       HU |   18
       IT |   18
       JP |   10
       KR |   15
       LT |   17
       LV |   16
       MX |   13
       NL |   17
       PL |   18
       PT |   18
       RO |   18
       SE |   18
       SI |   16
       SK |   17
----------------
(0 observations deleted)

Duplicates in terms of all variables

(428 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000i.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000i.tmp saved

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                27  (_merge==3)
    -----------------------------------------
(0 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000j.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000j.tmp saved
decile_4_7

----------------
          | year
  isocode | 2016
----------+-----
       AT |   15
       BE |   16
       BG |   16
       CZ |   17
       DE |   17
       DK |   18
       EE |   16
       ES |   18
       FI |   18
       FR |   18
       GB |   18
       GR |   15
       HR |   17
       HU |   18
       IT |   18
       JP |    9
       KR |   14
       LT |   17
       LV |   16
       MX |   11
       NL |   16
       PL |   17
       PT |   17
       RO |   18
       SE |   18
       SI |   16
       SK |   17
----------------
(9 observations deleted)

Duplicates in terms of all variables

(408 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000k.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000k.tmp saved

    Result                           # of obs.
    -----------------------------------------
    not matched                             1
        from master                         1  (_merge==1)
        from using                          0  (_merge==2)

    matched                                26  (_merge==3)
    -----------------------------------------
(1 observation deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000l.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000l.tmp saved
decile_5_6

----------------
          | year
  isocode | 2016
----------+-----
       AT |   14
       BE |   16
       BG |   14
       CZ |   16
       DE |   17
       DK |   12
       EE |   13
       ES |   18
       FI |   15
       FR |   18
       GB |   18
       GR |   14
       HR |   15
       HU |   17
       IT |   18
       JP |    8
       KR |   13
       LT |   11
       LV |   12
       MX |    6
       NL |   15
       PL |   16
       PT |   15
       RO |   16
       SE |   16
       SI |   13
       SK |   15
----------------
(14 observations deleted)

Duplicates in terms of all variables

(357 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000m.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000m.tmp saved

    Result                           # of obs.
    -----------------------------------------
    not matched                             2
        from master                         2  (_merge==1)
        from using                          0  (_merge==2)

    matched                                25  (_merge==3)
    -----------------------------------------
(2 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000n.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000n.tmp saved
above3ctry

----------------
          | year
  isocode | 2016
----------+-----
       AT |   16
       BE |   19
       BG |   17
       CZ |   18
       DE |   19
       DK |   18
       EE |   17
       ES |   18
       FI |   18
       FR |   18
       GB |   18
       GR |   17
       HR |   17
       HU |   18
       IT |   18
       JP |   14
       KR |   16
       LT |   17
       LV |   17
       MX |   15
       NL |   18
       PL |   18
       PT |   17
       RO |   19
       SE |   19
       SI |   18
       SK |   18
----------------
(0 observations deleted)

Duplicates in terms of all variables

(446 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000o.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000o.tmp saved

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                27  (_merge==3)
    -----------------------------------------
(0 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000p.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000p.tmp saved
above5ctry

----------------
          | year
  isocode | 2016
----------+-----
       AT |   16
       BE |   19
       BG |   16
       CZ |   17
       DE |   19
       DK |   17
       EE |   16
       ES |   18
       FI |   17
       FR |   18
       GB |   18
       GR |   16
       HR |   17
       HU |   17
       IT |   18
       JP |   13
       KR |   16
       LT |   17
       LV |   15
       MX |   13
       NL |   17
       PL |   18
       PT |   17
       RO |   18
       SE |   19
       SI |   17
       SK |   17
----------------
(0 observations deleted)

Duplicates in terms of all variables

(430 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000q.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000q.tmp saved

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                27  (_merge==3)
    -----------------------------------------
(0 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000r.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000r.tmp saved
above10ctry

----------------
          | year
  isocode | 2016
----------+-----
       AT |   16
       BE |   16
       BG |   14
       CZ |   17
       DE |   18
       DK |   17
       EE |   15
       ES |   18
       FI |   17
       FR |   18
       GB |   18
       GR |   16
       HR |   15
       HU |   17
       IT |   18
       JP |   10
       KR |   14
       LT |   14
       LV |   13
       MX |    9
       NL |   15
       PL |   18
       PT |   17
       RO |   16
       SE |   18
       SI |   15
       SK |   16
----------------
(9 observations deleted)

Duplicates in terms of all variables

(390 observations deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000s.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000s.tmp saved

    Result                           # of obs.
    -----------------------------------------
    not matched                             1
        from master                         1  (_merge==1)
        from using                          0  (_merge==2)

    matched                                26  (_merge==3)
    -----------------------------------------
(1 observation deleted)
(note: file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000t.tmp not found)
file C:\Users\VANESS~1\AppData\Local\Temp\ST_2168_00000t.tmp saved

. 
. 
. 
. *Merging the different samples
. *-----------------------------------------------------------------
. clear all

. use year isocode type D_A using "${data}/estimates_agg_naics_sales_s1_base_woparent.dta", clear

. rename D_A D_A_baseline

. 
. foreach rsample in decile_2_9 decile_3_8 decile_4_7 decile_5_6 above3ctry above5ctry above10ctry {
  2. display "`rsample'"
  3. merge 1:1 year isocode type using `file_`rsample'', keepusing(D_A*)
  4. rename D_A D_A_`rsample'
  5. drop _merge
  6. }
decile_2_9

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                27  (_merge==3)
    -----------------------------------------
decile_3_8

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                27  (_merge==3)
    -----------------------------------------
decile_4_7

    Result                           # of obs.
    -----------------------------------------
    not matched                             1
        from master                         1  (_merge==1)
        from using                          0  (_merge==2)

    matched                                26  (_merge==3)
    -----------------------------------------
decile_5_6

    Result                           # of obs.
    -----------------------------------------
    not matched                             2
        from master                         2  (_merge==1)
        from using                          0  (_merge==2)

    matched                                25  (_merge==3)
    -----------------------------------------
above3ctry

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                27  (_merge==3)
    -----------------------------------------
above5ctry

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                27  (_merge==3)
    -----------------------------------------
above10ctry

    Result                           # of obs.
    -----------------------------------------
    not matched                             1
        from master                         1  (_merge==1)
        from using                          0  (_merge==2)

    matched                                26  (_merge==3)
    -----------------------------------------

. 
. local grvar0 "gdp_pw_ppp" 

. local grvar1 "" 

. local rr ""

. local var3 "P"

. local yy "2016"

. local yy_ref=`yy'       

. replace year=`yy_ref'
(0 real changes made)

. merge m:1 year isocode type using "${data}/aggregates_tfp_lp_klems_agg.dta" 
(note: variable year was float, now double to accommodate using data's values)
(note: variable isocode was str2, now str32 to accommodate using data's values)
(note: variable type was str5, now str9 to accommodate using data's values)

    Result                           # of obs.
    -----------------------------------------
    not matched                         2,985
        from master                         0  (_merge==1)
        from using                      2,985  (_merge==2)

    matched                                27  (_merge==3)
    -----------------------------------------

. drop if _merge==2
(2,985 observations deleted)

. drop _merge

. 
. foreach var in D_A_baseline D_A_decile_2_9 D_A_decile_3_8 D_A_decile_4_7 D_A_decile_5_6 D_A_above3ctry D_A_above5ctry D_A_above10ctry {
  2. gen `var'_phi=(-1)*`var'*(0.2)
  3. }
(1 missing value generated)
(2 missing values generated)
(1 missing value generated)

. 
. 
. 
. *------------------------------------------------------------------------------
. *DA dummies (baseline)
. *------------------------------------------------------------------------------
. local LHS1 D_A_baseline_phi

. local RHS ln_`grvar0'

.         
. reg `LHS1' `RHS'

      Source |       SS           df       MS      Number of obs   =        27
-------------+----------------------------------   F(1, 25)        =     12.07
       Model |  .222837263         1  .222837263   Prob > F        =    0.0019
    Residual |  .461517255        25   .01846069   R-squared       =    0.3256
-------------+----------------------------------   Adj R-squared   =    0.2986
       Total |  .684354518        26  .026321328   Root MSE        =    .13587

-------------------------------------------------------------------------------
D_A_baselin~i |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
ln_gdp_pw_ppp |   .3378563   .0972438     3.47   0.002     .1375789    .5381337
        _cons |  -.0883848   .0423907    -2.09   0.047    -.1756901   -.0010794
-------------------------------------------------------------------------------

. mat b = e(b)

. mat V = e(V)

. global c0: display %-03.2fc round(b[1,1],0.01)

. global se0: display %-03.2fc round(sqrt(V[1,1]),0.01)

. display $c0
.34

. display $se0
.1

. 
. *------------------------------------------------------------------------------
. *DA dummies for firms in the 2nd-9th deciles
. *------------------------------------------------------------------------------
. local LHS1 D_A_decile_2_9_phi

. local RHS ln_`grvar0'

.         
. reg `LHS1' `RHS'

      Source |       SS           df       MS      Number of obs   =        27
-------------+----------------------------------   F(1, 25)        =     10.74
       Model |  .193880513         1  .193880513   Prob > F        =    0.0031
    Residual |  .451256222        25  .018050249   R-squared       =    0.3005
-------------+----------------------------------   Adj R-squared   =    0.2725
       Total |  .645136735        26  .024812951   Root MSE        =    .13435

-------------------------------------------------------------------------------
D_A_dec~9_phi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
ln_gdp_pw_ppp |   .3151412   .0961567     3.28   0.003     .1171027    .5131797
        _cons |  -.0987183   .0419168    -2.36   0.027    -.1850476   -.0123889
-------------------------------------------------------------------------------

. mat b = e(b)

. mat V = e(V)

. global c1: display %-03.2fc round(b[1,1],0.01)

. global se1: display %-03.2fc round(sqrt(V[1,1]),0.01)

. display $c1
.32

. display $se1
.1

. 
. *------------------------------------------------------------------------------
. *DA dummies for firms in the 3nd-8th deciles
. *------------------------------------------------------------------------------
. local LHS1 D_A_decile_3_8_phi

. local RHS ln_`grvar0'

.         
. reg `LHS1' `RHS'

      Source |       SS           df       MS      Number of obs   =        27
-------------+----------------------------------   F(1, 25)        =      8.05
       Model |  .183869796         1  .183869796   Prob > F        =    0.0089
    Residual |  .571009167        25  .022840367   R-squared       =    0.2436
-------------+----------------------------------   Adj R-squared   =    0.2133
       Total |  .754878963        26  .029033806   Root MSE        =    .15113

-------------------------------------------------------------------------------
D_A_dec~8_phi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
ln_gdp_pw_ppp |   .3068974   .1081657     2.84   0.009      .084126    .5296689
        _cons |  -.1207796   .0471518    -2.56   0.017    -.2178906   -.0236686
-------------------------------------------------------------------------------

. mat b = e(b)

. mat V = e(V)

. global c2: display %-03.2fc round(b[1,1],0.01)

. global se2: display %-03.2fc round(sqrt(V[1,1]),0.01)

. display $c2
.31

. display $se2
.11

. 
. *------------------------------------------------------------------------------
. *DA dummies for firms in the 4nd-7th deciles
. *------------------------------------------------------------------------------
. local LHS1 D_A_decile_4_7_phi

. local RHS ln_`grvar0'

.         
. reg `LHS1' `RHS'

      Source |       SS           df       MS      Number of obs   =        26
-------------+----------------------------------   F(1, 24)        =      7.83
       Model |  .188320809         1  .188320809   Prob > F        =    0.0100
    Residual |  .576967061        24  .024040294   R-squared       =    0.2461
-------------+----------------------------------   Adj R-squared   =    0.2147
       Total |   .76528787        25  .030611515   Root MSE        =    .15505

-------------------------------------------------------------------------------
D_A_dec~7_phi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
ln_gdp_pw_ppp |   .3119853   .1114692     2.80   0.010     .0819242    .5420464
        _cons |  -.1326393   .0492969    -2.69   0.013    -.2343831   -.0308954
-------------------------------------------------------------------------------

. mat b = e(b)

. mat V = e(V)

. global c3: display %-03.2fc round(b[1,1],0.01)

. global se3: display %-03.2fc round(sqrt(V[1,1]),0.01)

. display $c3
.31

. display $se3
.11

. 
. *------------------------------------------------------------------------------
. *DA dummies for firms in the 5nd-6th deciles
. *------------------------------------------------------------------------------
. local LHS1 D_A_decile_5_6_phi

. local RHS ln_`grvar0'

.         
. reg `LHS1' `RHS'

      Source |       SS           df       MS      Number of obs   =        25
-------------+----------------------------------   F(1, 23)        =      9.20
       Model |  .232525031         1  .232525031   Prob > F        =    0.0059
    Residual |  .581307746        23   .02527425   R-squared       =    0.2857
-------------+----------------------------------   Adj R-squared   =    0.2547
       Total |  .813832777        24  .033909699   Root MSE        =    .15898

-------------------------------------------------------------------------------
D_A_dec~6_phi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
ln_gdp_pw_ppp |   .3726828   .1228694     3.03   0.006     .1185081    .6268575
        _cons |   -.127841   .0513403    -2.49   0.020    -.2340464   -.0216356
-------------------------------------------------------------------------------

. mat b = e(b)

. mat V = e(V)

. global c4: display %-03.2fc round(b[1,1],0.01)

. global se4: display %-03.2fc round(sqrt(V[1,1]),0.01)

. display $c4
.37

. display $se4
.12

. 
. *------------------------------------------------------------------------------
. *DA dummies for MNCs in 3 coountries or more 
. *------------------------------------------------------------------------------
. local LHS1 D_A_above3ctry_phi

. local RHS ln_`grvar0'

.         
. reg `LHS1' `RHS'

      Source |       SS           df       MS      Number of obs   =        27
-------------+----------------------------------   F(1, 25)        =     10.92
       Model |  .195417828         1  .195417828   Prob > F        =    0.0029
    Residual |  .447413933        25  .017896557   R-squared       =    0.3040
-------------+----------------------------------   Adj R-squared   =    0.2762
       Total |  .642831762        26  .024724299   Root MSE        =    .13378

-------------------------------------------------------------------------------
D_A_above3c~i |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
ln_gdp_pw_ppp |   .3163881   .0957465     3.30   0.003     .1191945    .5135817
        _cons |   -.086882    .041738    -2.08   0.048    -.1728431    -.000921
-------------------------------------------------------------------------------

. mat b = e(b)

. mat V = e(V)

. global c5: display %-03.2fc round(b[1,1],0.01)

. global se5: display %-03.2fc round(sqrt(V[1,1]),0.01)

. display $c5
.32

. display $se5
.1

. 
. 
. *------------------------------------------------------------------------------
. *DA dummies for MNCs in 5 coountries or more 
. *------------------------------------------------------------------------------
. local LHS1 D_A_above5ctry_phi

. local RHS ln_`grvar0'

.         
. reg `LHS1' `RHS'

      Source |       SS           df       MS      Number of obs   =        27
-------------+----------------------------------   F(1, 25)        =     11.54
       Model |   .15193886         1   .15193886   Prob > F        =    0.0023
    Residual |  .329297265        25  .013171891   R-squared       =    0.3157
-------------+----------------------------------   Adj R-squared   =    0.2884
       Total |  .481236126        26  .018509082   Root MSE        =    .11477

-------------------------------------------------------------------------------
D_A_above5c~i |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
ln_gdp_pw_ppp |   .2789796   .0821414     3.40   0.002     .1098062     .448153
        _cons |  -.0752071   .0358072    -2.10   0.046    -.1489535   -.0014606
-------------------------------------------------------------------------------

. mat b = e(b)

. mat V = e(V)

. global c6: display %-03.2fc round(b[1,1],0.01)

. global se6: display %-03.2fc round(sqrt(V[1,1]),0.01)

. display $c6
.28

. display $se6
.08

. 
. 
. *------------------------------------------------------------------------------
. *DA dummies for MNCs in 10 coountries or more 
. *------------------------------------------------------------------------------
. local LHS1 D_A_above10ctry_phi

. local RHS ln_`grvar0'

.         
. reg `LHS1' `RHS'

      Source |       SS           df       MS      Number of obs   =        26
-------------+----------------------------------   F(1, 24)        =     17.57
       Model |  .171727086         1  .171727086   Prob > F        =    0.0003
    Residual |  .234560492        24  .009773354   R-squared       =    0.4227
-------------+----------------------------------   Adj R-squared   =    0.3986
       Total |  .406287579        25  .016251503   Root MSE        =    .09886

-------------------------------------------------------------------------------
D_A_above10~i |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
ln_gdp_pw_ppp |   .3190767   .0761198     4.19   0.000     .1619732    .4761803
        _cons |  -.0206113   .0313511    -0.66   0.517    -.0853168    .0440942
-------------------------------------------------------------------------------

. mat b = e(b)

. mat V = e(V)

. global c7: display %-03.2fc round(b[1,1],0.01)

. global se7: display %-03.2fc round(sqrt(V[1,1]),0.01)

. display $c7
.32

. display $se7
.08

. 
. 
. *------------------------------------------------------------------------------
. *Generate Table 4 
. *------------------------------------------------------------------------------
. clear all

. set obs 8
number of observations (_N) was 0, now 8

. 
. gen model=""
(8 missing values generated)

. gen phi_share=. 
(8 missing values generated)

. gen phi_share_se=. 
(8 missing values generated)

. 
. replace model="Baseline" if _n==1
variable model was str1 now str8
(1 real change made)

. replace phi_share=$c0 if _n==1
(1 real change made)

. replace phi_share_se=$se0 if _n==1
(1 real change made)

. 
. replace model="MNEs (2nd-9th decile)" if _n==2
variable model was str8 now str21
(1 real change made)

. replace phi_share=$c1 if _n==2
(1 real change made)

. replace phi_share_se=$se1 if _n==2
(1 real change made)

. 
. replace model="MNEs (3nd-8th decile)" if _n==3
(1 real change made)

. replace phi_share=$c2 if _n==3
(1 real change made)

. replace phi_share_se=$se2 if _n==3
(1 real change made)

. 
. replace model="MNEs (4nd-7th decile)" if _n==4
(1 real change made)

. replace phi_share=$c3 if _n==4
(1 real change made)

. replace phi_share_se=$se3 if _n==4
(1 real change made)

. 
. replace model="MNEs (5nd-6th decile)" if _n==5
(1 real change made)

. replace phi_share=$c4 if _n==5
(1 real change made)

. replace phi_share_se=$se4 if _n==5
(1 real change made)

. 
. replace model="MNEs (above3ctry)" if _n==6
(1 real change made)

. replace phi_share=$c5 if _n==6
(1 real change made)

. replace phi_share_se=$se5 if _n==6
(1 real change made)

. 
. replace model="MNEs (above5ctry)" if _n==7
(1 real change made)

. replace phi_share=$c6 if _n==7
(1 real change made)

. replace phi_share_se=$se6 if _n==7
(1 real change made)

. 
. replace model="MNEs (above10ctry)" if _n==8
(1 real change made)

. replace phi_share=$c7 if _n==8
(1 real change made)

. replace phi_share_se=$se7 if _n==8
(1 real change made)

. 
. export delimited using "${rmain}/table_04_restrcited_samples.csv", datafmt replace
(note: file F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_04_restrcited_samples.csv not
>  found)
file F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/results/main/table_04_restrcited_samples.csv saved

. 
. log close
      name:  <unnamed>
       log:  F:/Dropbox (UBC-Umich)/Research_Projects/Project Javier and Natalia/TFP firm/TFP_firm_data_historical/dataverse_files/code/logs/table_04_restricted_samples.log
  log type:  text
 closed on:  10 Nov 2022, 19:03:58
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
